package com.etc.pojo;

import java.util.List;

public class Result {
    private int code;
    private String msg;
    private Object data;
    public Result(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;

    }

    public static Result ok(EmpMst emp) {
        return new Result(200, "ok", emp);
    }

    public static Result ok(String message) {
        return new Result(200, message, null);
    }

    public static Result fail(String message) {
        return  new Result(200, message, null);
    }

    public static Result ok(Object data) {
        return new Result(200, "ok", data);
    }

    public static Result ok(String s, EmpMst empMst) {
        return  new Result(200, s, empMst);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
